<?php
 session_start();
require_once("../includes/public.inc.php");
$sysconfig=mysql_fetch_array(mysql_query("select * from ".DBQIAN."_sys_config where uid=1"));
if( $_SESSION['ucode'])
{
	$urls=WEBNAME."main/top_list.php";
	header("location:".$urls);
}
else
{
	$locaurl=urlencode(WEBNAME."main/top_list.php");
	$urls="https://open.weixin.qq.com/connect/oauth2/authorize?appid=".$sysconfig['cappid']."&redirect_uri=".$locaurl."&response_type=code&scope=snsapi_userinfo#wechat_redirect";
	
	header("location:".$urls);
}

?>